<?
/**
 * Display image from selected source
 */
 define('BASE_PATH', realpath(__DIR__));
 
 require_once __DIR__.'/../api/Image.php';
 if(!empty($_GET['image']))
 {
    try{
        if($_GET['source'] == 'tmp')
        {
            \Api\Image::getUploadedImage($_GET['image']);
        }elseif($_GET['source'] == 'thumb')
        {
            \Api\Image::getThumbImage($_GET['image']);
        }elseif($_GET['source'] == 'image')
        {
            \Api\Image::getImage($_GET['image']);
        }elseif($_GET['source'] == 'intro')
        {
             \Api\Image::getIntroImage($_GET['image']);
        }
    }catch(Exception $e)
    {
        echo $e->getMessage();
    }
 }
 
?>